{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/pages/Auth/index.tsx\",\n  _s = $RefreshSig$();\nimport React from \"react\";\nimport { LoginForm, PasswordForm, RegistrationForm } from \"../../modules/\";\nimport { Error, AlertBubble } from \"../../components\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst Auth = () => {\n  _s();\n  const [info, setInfo] = React.useState(false);\n  const [data, setData] = React.useState({\n    current: 'login'\n  });\n  const updateData = value => {\n    setData({\n      current: value\n    });\n  };\n  const updateInfo = value => {\n    setInfo(value);\n  };\n  if (data.current === 'registration') {\n    return /*#__PURE__*/_jsxDEV(\"section\", {\n      className: \"auth\",\n      children: [/*#__PURE__*/_jsxDEV(AlertBubble, {\n        text: 'Проверьте почту, чтобы подтвердить активацию аккаунта.',\n        state: info,\n        updateInfo: updateInfo\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 23,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(Error, {\n        text: \"\\u041F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u0442\\u0435\\u043B\\u044C \\u0441 \\u0442\\u0430\\u043A\\u0438\\u043C \\u0430\\u0434\\u0440\\u0435\\u0441\\u043E\\u043C \\u044D\\u043B\\u0435\\u043A\\u0442\\u0440\\u043E\\u043D\\u043D\\u043E\\u0439 \\u043F\\u043E\\u0447\\u0442\\u044B \\u0438\\u043B\\u0438 \\u043F\\u0441\\u0435\\u0432\\u0434\\u043E\\u043D\\u0438\\u043C\\u043E\\u043C \\u0443\\u0436\\u0435 \\u0441\\u0443\\u0449\\u0435\\u0441\\u0442\\u0432\\u0443\\u0435\\u0442. \\u041E\\u0448\\u0438\\u0431\\u043A\\u0430 \\u0432\\u0430\\u043B\\u0438\\u0434\\u0430\\u0446\\u0438\\u0438.\"\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 24,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(RegistrationForm, {\n        updateData: updateData,\n        updateInfo: updateInfo\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 25,\n        columnNumber: 17\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 22,\n      columnNumber: 13\n    }, this);\n  }\n  if (data.current === 'forgot') {\n    return /*#__PURE__*/_jsxDEV(\"section\", {\n      className: \"auth\",\n      children: [/*#__PURE__*/_jsxDEV(AlertBubble, {\n        text: 'Проверьте почту, чтобы продолжить сброс пароля.',\n        state: info,\n        updateInfo: updateInfo\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 33,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(Error, {\n        text: \"\\u041F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u0442\\u0435\\u043B\\u044C \\u0441 \\u0442\\u0430\\u043A\\u0438\\u043C \\u0430\\u0434\\u0440\\u0435\\u0441\\u043E\\u043C \\u044D\\u043B\\u0435\\u043A\\u0442\\u0440\\u043E\\u043D\\u043D\\u043E\\u0439 \\u043F\\u043E\\u0447\\u0442\\u044B \\u0438\\u043B\\u0438 \\u043F\\u0441\\u0435\\u0432\\u0434\\u043E\\u043D\\u0438\\u043C\\u043E\\u043C \\u043D\\u0435 \\u0441\\u0443\\u0449\\u0435\\u0441\\u0442\\u0432\\u0443\\u0435\\u0442. \\u041E\\u0448\\u0438\\u0431\\u043A\\u0430 \\u0432\\u0430\\u043B\\u0438\\u0434\\u0430\\u0446\\u0438\\u0438.\"\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 34,\n        columnNumber: 17\n      }, this), /*#__PURE__*/_jsxDEV(PasswordForm, {\n        updateData: updateData,\n        updateInfo: updateInfo\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 35,\n        columnNumber: 17\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 32,\n      columnNumber: 13\n    }, this);\n  }\n  return /*#__PURE__*/_jsxDEV(\"section\", {\n    className: \"auth\",\n    children: [/*#__PURE__*/_jsxDEV(Error, {\n      text: \"\\u041D\\u0435\\u043A\\u043E\\u0440\\u0440\\u0435\\u043A\\u0442\\u043D\\u043E \\u0432\\u0432\\u0435\\u0434\\u0435\\u043D\\u044B \\u0434\\u0430\\u043D\\u043D\\u044B\\u0435.\"\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 41,\n      columnNumber: 13\n    }, this), /*#__PURE__*/_jsxDEV(LoginForm, {\n      updateData: updateData\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 42,\n      columnNumber: 13\n    }, this)]\n  }, void 0, true, {\n    fileName: _jsxFileName,\n    lineNumber: 40,\n    columnNumber: 9\n  }, this);\n};\n_s(Auth, \"Y/9TyRyeQfQHxlImDjeb4qe+NbA=\");\n_c = Auth;\nexport default Auth;\nvar _c;\n$RefreshReg$(_c, \"Auth\");","map":{"version":3,"names":["React","LoginForm","PasswordForm","RegistrationForm","Error","AlertBubble","Auth","info","setInfo","useState","data","setData","current","updateData","value","updateInfo"],"sources":["/data/messenger.client/src/pages/Auth/index.tsx"],"sourcesContent":["import React from \"react\";\nimport {LoginForm, PasswordForm, RegistrationForm} from \"../../modules/\"\nimport {Error, AlertBubble} from \"../../components\";\n\nconst Auth: React.FC = () => {\n    const [info, setInfo] = React.useState(false);\n    const [data, setData] = React.useState({\n            current: 'login'\n        }\n    );\n\n    const updateData = (value: string) => {\n        setData({ current: value });\n    }\n\n    const updateInfo = (value: boolean) => {\n        setInfo(value);\n    }\n\n    if (data.current === 'registration') {\n        return (\n            <section className='auth'>\n                <AlertBubble text={'Проверьте почту, чтобы подтвердить активацию аккаунта.'} state={info} updateInfo={updateInfo} />\n                <Error text='Пользователь с таким адресом электронной почты или псевдонимом уже существует. Ошибка валидации.' />\n                <RegistrationForm updateData={updateData} updateInfo={updateInfo} />\n            </section>\n        );\n    }\n    if (data.current === 'forgot') {\n\n        return (\n            <section className='auth'>\n                <AlertBubble text={'Проверьте почту, чтобы продолжить сброс пароля.'} state={info} updateInfo={updateInfo} />\n                <Error text='Пользователь с таким адресом электронной почты или псевдонимом не существует. Ошибка валидации.' />\n                <PasswordForm updateData={updateData} updateInfo={updateInfo} />\n            </section>\n        );\n    }\n    return (\n        <section className='auth'>\n            <Error text='Некорректно введены данные.' />\n            <LoginForm updateData={updateData}/>\n        </section>\n    );\n}\n\nexport default Auth;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,SAAS,EAAEC,YAAY,EAAEC,gBAAgB,QAAO,gBAAgB;AACxE,SAAQC,KAAK,EAAEC,WAAW,QAAO,kBAAkB;AAAC;AAEpD,MAAMC,IAAc,GAAG,MAAM;EAAA;EACzB,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGR,KAAK,CAACS,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGX,KAAK,CAACS,QAAQ,CAAC;IAC/BG,OAAO,EAAE;EACb,CAAC,CACJ;EAED,MAAMC,UAAU,GAAIC,KAAa,IAAK;IAClCH,OAAO,CAAC;MAAEC,OAAO,EAAEE;IAAM,CAAC,CAAC;EAC/B,CAAC;EAED,MAAMC,UAAU,GAAID,KAAc,IAAK;IACnCN,OAAO,CAACM,KAAK,CAAC;EAClB,CAAC;EAED,IAAIJ,IAAI,CAACE,OAAO,KAAK,cAAc,EAAE;IACjC,oBACI;MAAS,SAAS,EAAC,MAAM;MAAA,wBACrB,QAAC,WAAW;QAAC,IAAI,EAAE,wDAAyD;QAAC,KAAK,EAAEL,IAAK;QAAC,UAAU,EAAEQ;MAAW;QAAA;QAAA;QAAA;MAAA,QAAG,eACpH,QAAC,KAAK;QAAC,IAAI,EAAC;MAAkG;QAAA;QAAA;QAAA;MAAA,QAAG,eACjH,QAAC,gBAAgB;QAAC,UAAU,EAAEF,UAAW;QAAC,UAAU,EAAEE;MAAW;Q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